import requests
# 1494935514623631360
# 添加员工
class Ihrm_Emp(object):
    @classmethod
    def ihrm_emp_add(cls,header,jsons):
        resp = requests.post(url="http://ihrm-test.itheima.net/api/sys/user",
                     headers=header,
                     json=jsons)
        return resp
    @classmethod
    def ihrm_emp_query(cls,del_id,header):
        # 查询员工
        resp = requests.get(url="http://ihrm-test.itheima.net/api/sys/user/"+del_id,
                    headers=header)
        return resp
    @classmethod
    # 修改员工
    def ihrm_emp_alter(cls,del_id,header,jsons):
        resp = requests.put(url="http://ihrm-test.itheima.net/api/sys/user/"+del_id,
                    headers=header,
                    json=jsons)
        return resp
    #删除员工
    @classmethod
    def ihrm_emp_remove(cls,del_id,header):
        resp = requests.delete(url="http://ihrm-test.itheima.net/api/sys/user/"+del_id,
                       headers=header)
        return resp